package cn.zlg.common.datadump.processor;

import cn.zlg.common.datadump.annotation.DataDumpEntity;

public class BaseImportEntityProcessor<F, T> implements ImportEntityProcessor<F,T> {

    @Override
    public F processBeforeValidate(F origin, DataDumpEntity annotation) {
        return origin;
    }

    /**
     * 验证后，创建实例前调用
     * @param origin
     * @param annotation
     * @return
     */
    public F processAftertValidate(F origin, DataDumpEntity annotation) {
        return origin;
    }

    @Override
    public T processBeforeSave(F origin, T entity, DataDumpEntity annotation) {
        return entity;
    }

    @Override
    public T processBeforePersist(F origin, T entity, DataDumpEntity annotation, boolean override) {
        return entity;
    }

    @Override
    public T processAfterSave(F origin, T entity, DataDumpEntity annotation) {
        return entity;
    }

}
